package day13_Io.demo01_file;

import java.io.File;
import java.io.IOException;

//复制文件到新目录
public class Demo13 {
    public static void main(String[] args) throws IOException {
        File file = new File("E:\\csw\\Demo\\a\\b");
        File newfile = new File("E:\\csw\\Demo\\copy");
        String[] list = file.list();//获取所有文件
        for (String s : list) {
            File file1;
            file1 = new File(newfile, s);
            file1.createNewFile();
        }
    }
}
